package com.z4.nordicchinese;



import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

@SuppressWarnings("deprecation")
public class MainTab extends TabActivity {
	

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main_tab);
        
        /* TabHost will have Tabs */
        TabHost tabHost = (TabHost)findViewById(android.R.id.tabhost);
        
        /* TabSpec used to create a new tab. 
         * By using TabSpec only we can able to setContent to the tab.
         * By using TabSpec setIndicator() we can set name to tab. */
        
        /* tid1 is firstTabSpec Id. Its used to access outside. */
        TabSpec firstTabSpec = tabHost.newTabSpec("Nordic Chinese");
        TabSpec secondTabSpec = tabHost.newTabSpec("Chinasky BBS");
        TabSpec thirdTabSpec = tabHost.newTabSpec("SJ");
        TabSpec fourthTabSpec = tabHost.newTabSpec("SL");  
        TabSpec fifthTabSpec = tabHost.newTabSpec("SL");
        /* TabSpec setIndicator() is used to set name for the tab. */
        /* TabSpec setContent() is used to set content for a particular tab. */
        
       
        firstTabSpec.setIndicator("", getResources().getDrawable(R.drawable.nc)).setContent(new Intent(this,NCTab.class));
        secondTabSpec.setIndicator("", getResources().getDrawable(R.drawable.cs)).setContent(new Intent(this,CSTab.class));
        thirdTabSpec.setIndicator("", getResources().getDrawable(R.drawable.sj)).setContent(new Intent(this,SJTab.class));
        fourthTabSpec.setIndicator("", getResources().getDrawable(R.drawable.sl)).setContent(new Intent(this,SLTab.class));
        fifthTabSpec.setIndicator("", getResources().getDrawable(R.drawable.di)).setContent(new Intent(this,DITab.class));
       
        
        /* Add tabSpec to the TabHost to display. */
        tabHost.addTab(firstTabSpec);
        tabHost.addTab(secondTabSpec);
        tabHost.addTab(thirdTabSpec);
        tabHost.addTab(fourthTabSpec);    
        tabHost.addTab(fifthTabSpec); 
    }
    
	public void onDestroy()
	{
		super.onDestroy();
	}

	public void onResume()
	{
		super.onResume();
	}
    protected void onPause() {
 		// TODO Auto-generated method stub
 		super.onPause();

 	}

	

}
